<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <canvas id="arc" width="800" height="600"></canvas>
  <script src="../utils/index.js"></script>
  <script>
    const canvas = document.querySelector('#arc')
    const ctx = canvas.getContext('2d')
    /**
     * ctx.arc(x, y, r, startAngle, endAngle, counterclockwise)
     * 1. x:水平坐标
     * 2. y:垂直坐标
     * 3. r:半径
     * 4. startAngle: 起始角度
     * 5. endAngle: 结束角度
     * 6. counterclockwise: 表示顺时针或者逆时针方向  默认false(顺时针)/true(逆时针)
     */

    ctx.beginPath()
    ctx.arc(100, 100, 50, 0, Math.PI * 2, false)
    ctx.fillStyle = Lrt.randomColor3()
    ctx.fill()
    ctx.lineWidth = 10
    ctx.strokeStyle = Lrt.randomColor4()
    ctx.stroke()
    ctx.closePath()
  </script>
</body>

</html>